tc =

verdi_opts = -P $(VERDI_HOME)/share/PLI/VCS/LINUX64/novas.tab $(VERDI_HOME)/share/PLI/VCS/LINUX64/pli.a

rtl_list = ../../design/rtl
commonip_list = ../../design/common_ip
tb_list	= ../../verify/vtb

tb_files = $(tb_list)/$(tc).v

all:  mklist com sim 

mklist:
				rm -rf ${rtl_list}/filelist.f
				touch ${rtl_list}/filelist.f
				find  ${commonip_list}  -type f >>${rtl_list}/filelist.f 
				find  ${rtl_list}/*.v >>${rtl_list}/filelist.f

com:
				vcs \
				+v2k \
				+vcs+loopreport \
				-sverilog \
				-debug_all \
				$(verdi_opts) \
				-timescale=1ns/1ps \
				$(tb_files) \
				+incdir+${commonip_list} \
				-F ${rtl_list}/filelist.f \
				-l com.log \
				-full64


sim:
				./simv -l sim.log

verdi:
				verdi \
				-sv \
				+v2k \
				$(tb_files) \
				-F ${rtl_list}/filelist.f \
				-ssf *.fsdb \
				-nologo &


clean:
				rm -rf  *.key *.vpd DVEfiles coverage *.vdb  novas* verdiLog vfastLog *.mr *.pvl *.syn *.svf ${rtl_list}/filelist.f

